﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using InputBoxSample;
using PatentApp.Models;
using PatentApp.Data;

namespace PatentApp
{
    public partial class dlgValues : Form
    {
        public dlgValues(List<String> lst)
        {
            InitializeComponent();
            listBox1.Items.AddRange(lst.ToArray());
        }
        
        public string result { get; set; }

        private void btnAddCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.No;
            this.Close();
        }

        private void btnAddNext_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedItems.Count > 0)
            {
                result = listBox1.SelectedItem.ToString();
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }

    }
}
